package com.coldchain.common.vo;

import com.baomidou.mybatisplus.annotation.TableField;

import java.util.ArrayList;
import java.util.List;

/**
 * 树形结构对像
 */
public abstract class TreeNodeVo<T> {


    public List<T> getChildren() {
        return children;
    }

    public void setChildren(List<T> children) {
        this.children = children;
    }

    @TableField(exist = false)
    List<T> children = new ArrayList<T>();

    public abstract Object getNodeId();
    public  abstract Object getParentId();
    public void add(T node){
        children.add(node);
    }

}
